# -*- coding: utf-8 -*-
# @Time    : 2019/11/7 15:39
# @Author  : xiao
import os
import sys

from basic.data import global_var
from basic.utils.Email import sendEmail
from basic.UIParent import UIParent
from basic.utils.path import Path
from basic.utils.runnerInit import CaseRunner
from test.cases.ann.annApplication.donate_blood import DonateBloodCase
from test.cases.ann.annApplication.gui_health import GuiHealthyCase
from test.cases.ann.annApplication.health_assessment import HealthAssessmentCase
from test.cases.ann.annApplication.health_certificate_inquiry import HealthCertificateInquiryCase
from test.cases.ann.annApplication.health_knowledge_cloud import HealthKnowledgeCloudCase
from test.cases.ann.annApplication.internet_diagnosis import InternetDiagnosisCase
from test.cases.ann.annApplication.medical_insurance import MedicalInsuranceCase
from test.cases.ann.annApplication.physical_examination import PhysicalExaminationCase
from test.cases.ann.annApplication.prescription_sharing import PrescriptionSharingCase
from test.cases.ann.annApplication.born_register import BornRegisterCase
from test.cases.ann.annApplication.corona import CoronaCase
from test.cases.ann.annApplication.doctorOnline import DoctorOnlineCase
from test.cases.ann.annApplication.healthClass import HealthClassCase
from test.cases.ann.annApplication.selfCheckCorona import SelfCheckCoronaCase
from test.cases.ann.accumulationFund import AccumulationFundCase
from test.cases.ann.cancellating import CancellatingCase
from test.cases.ann.collectionApp import collectionAppCase
from test.cases.ann.dataSecretary import DataSecretaryCase
from test.cases.ann.zhengwu import BsCase
from test.cases.ann.coupon import CouponCase
from test.cases.ann.digital import DigitalCase
from test.cases.ann.finance import FinanceCase
from test.cases.ann.growValue import growValue
from test.cases.ann.headlines import HeadlinesCase
from test.cases.ann.oclife import OclifeCase
from test.cases.ann.index import IndexCase
from test.cases.ann.personalCredit import PersonalCreditCase
from test.cases.ann.share import ShareCase
from test.cases.ann.search import SearchCase
from test.cases.ann.message import MessageCase
from test.cases.ann.help import HelpCase
from test.cases.ann.card import CardCase
from test.cases.ann.tax import TaxCase
from test.cases.ann.tsyh import TsyhCase
from test.cases.ann.weather import WeatherCase
from test.cases.ann.ws import WsCase
from test.cases.ann.ycfl import YcflCase
from test.cases.ann.annApplication.credit_medical import CreditMedicalCase
from test.cases.ann.annApplication.benefit_medical import BenefitMedicalCase


from BeautifulReport import BeautifulReport as bf
current_directory = os.path.dirname(os.path.abspath(__file__))
root_path = os.path.abspath(os.path.dirname(current_directory) + os.path.sep + ".")
sys.path.append(root_path)


if __name__ == '__main__':
   """
   调试通过的测试用例集合
   """

   #报告
   classNameList = [SearchCase]


   suite = CaseRunner.runCases(classNameList)
   run = bf(suite)  # 实例化BeautifulReport模块
   run.report(filename='test',report_dir=Path.getProjectPath()+"/res/report", description='UI自动化测试用例')
#    sendEmail("UI自动化测试", CaseRunner.caseResult(run, 0), 0)
